﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XMLConfig"
    targetNamespace="http://adrianehrsam.ch/XMLConfig.xsd"
    elementFormDefault="qualified"
    xmlns="http://adrianehrsam.ch/XMLConfig.xsd"
    xmlns:mstns="http://adrianehrsam.ch/XMLConfig.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:element name="config">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="configgroups">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="configgroup" maxOccurs="unbounded" minOccurs="0" >
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="configuration" minOccurs="1" maxOccurs="1">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="modul"  use="optional"/>
                            <xs:attribute type="xs:string" name="output" use="required"/>
                            <xs:attribute type="xs:string" name="sourcedll"  use="optional"/>
                            <xs:attribute type="xs:int" name="recursionLevel"  use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="types">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="type" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute type="xs:string" name="name" use="optional"/>
                                  <xs:attribute name="generate" use="required">
                                    <xs:simpleType>
                                      <xs:restriction base="xs:string">
                                        <xs:enumeration value="interface"/>
                                        <xs:enumeration value="class"/>
                                        <xs:enumeration value="apicontroller" />
                                      </xs:restriction>
                                    </xs:simpleType>
                                  </xs:attribute>
                                  <xs:attribute type="xs:boolean" name="useobservable" use="optional">
                                    <xs:annotation>
                                      <xs:appinfo>Benutze Knockout-Observable</xs:appinfo>
                                      <xs:documentation>Benutze KnockoutJS-Observable-Funktionen</xs:documentation>
                                    </xs:annotation>
                                  </xs:attribute>
                                  <xs:attribute type="xs:boolean" name="useinitalvalue" use="optional">
                                    <xs:annotation>
                                      <xs:appinfo>Standardwerte initialisieren</xs:appinfo>
                                      <xs:documentation>Standardwerte initialisieren</xs:documentation>

                                    </xs:annotation>

                                  </xs:attribute>
                                  <xs:attribute type="xs:string" name="webservicemethod" use="optional">
                                    <xs:annotation>
                                      <xs:appinfo>Werservice Methode</xs:appinfo>
                                      <xs:documentation>Methode, die Daten von einem JSON Object (zB von einem Webservice) holt</xs:documentation>
                                    </xs:annotation>
                                  </xs:attribute>

                                  <xs:attribute type="xs:string" name="newname" use="optional" />
                                  <xs:attribute type="xs:boolean" name="useinitialvalue" use="optional"/>
                                  <xs:attribute type="xs:string" name="modul" use="optional"/>
                                  <xs:attribute type="xs:string" name="output" use="optional"/>
                                  <xs:attribute type="xs:int" name="recursionLevel"  use="optional"/>
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
